package cn.tedu.bootdemo.dto;


import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;


import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

@Data
@Accessors(chain = true)
public class AdminAddNewDTO implements Serializable {

    @ApiModelProperty(value = "用户名", example = "admin001",required = true)
    @NotEmpty(message = "增加管理员失败，必须提交用户名！")
//    @Pattern(regexp = "[a-zA-Z0-9_]{4,16}", message = "增加管理员失败，用户名格式错误！")
    private String username;

    @ApiModelProperty(value = "密码", example = "123456",required = true)
    @NotEmpty(message = "增加管理员失败，必须提交密码！")
    private String password;

    @ApiModelProperty(value = "昵称", example = "管理员1号",required = true)
    @NotEmpty(message = "增加管理员失败，必须提交昵称！")
    private String nickname;

}
